#@layout()

#define main()
    #@flyColumn()
    <div class="layui-container">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md8">
                <!--置顶-->
                <div class="fly-panel">
                    <div class="fly-panel-title fly-filter">
                        <a>置顶</a>
                        <!--<a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin" style="color: #FF5722;">去签到</a>-->
                    </div>
                    <ul class="fly-list">
                        #for(x : top.rows??)
                        <li>
                            <a href="/user/#(x.userid)" class="fly-avatar">
                                <img src="#(x.avatar)" alt="#(x.nickname)">
                            </a>
                            <h2 title="#(x.title)">
                                #if(x.status == 30)
                                <a class="layui-badge">私密</a>
                                #else
                                <a class="layui-badge">#(x.typename)</a>
                                #end
                                <a href="/jie/detail/#(x.contentid)">
                                    #if(x.top == 30)
                                        <span style="color: #AB5D7C;font-weight: bold;">#(x.title)</span>
                                    #else
                                        #(x.title)
                                    #end
                                </a>
                            </h2>
                            <div class="fly-list-info">
                                <a href="/user/#(x.userid)" link>
                                    <cite>#(x.nickname)</cite>
                                    <!--<i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                                    <i class="layui-badge fly-badge-vip">VIP3</i>-->
                                </a>
                                <span>#(x.createtime)</span>

                                <!--
                                <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> 60</span>
                                <span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
                                -->
                                <span class="fly-list-nums">
                        <i class="iconfont" title="人气">&#xe60b;</i> #(x.viewnum??0)
                        <i class="iconfont icon-pinglun1" title="回答"></i> #(x.replynum??0)
                      </span>
                            </div>
                            <div class="fly-list-badge">
                                <!--
                                <span class="layui-badge layui-bg-black">置顶</span>
                                <span class="layui-badge layui-bg-red">精帖</span>
                                -->
                            </div>
                        </li>
                        #end
                    </ul>
                </div>

                <div class="fly-panel" style="margin-bottom: 0;">

                    <div class="fly-panel-title fly-filter">
                        <a href="/column" class="layui-this">综合</a>
                        <span class="fly-mid"></span>
                        <a href="/column?solved=0">未结</a>
                        <span class="fly-mid"></span>
                        <a href="/column?solved=1">已结</a>
                        <span class="fly-mid"></span>
                        <a href="/column?wonderful=1">精华</a>
                        <span class="fly-filter-right layui-hide-xs">
                    <a href="" class="layui-this">按最新</a>
                    <span class="fly-mid"></span>
                    <a href="">按热议</a>
                  </span>
                    </div>

                    <ul class="fly-list">
                        #for(x : contents.rows??)
                        <li>
                            <a href="/user/#(x.userid)" class="fly-avatar">
                                <img src="#(x.avatar)" alt="#(x.nickname)">
                            </a>
                            <h2 title="#(x.title)">
                                #if(x.status == 30)
                                <a class="layui-badge">私密</a>
                                #else
                                <a class="layui-badge">#(x.typename)</a>
                                #end
                                <a href="/jie/detail/#(x.contentid)">#(x.title)</a>
                            </h2>
                            <div class="fly-list-info">
                                <a href="/user/#(x.userid)" link>
                                    <cite>#(x.nickname)</cite>
                                    <!--
                                    <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                                    <i class="layui-badge fly-badge-vip">VIP3</i>
                                    -->
                                </a>
                                <span>#(x.createtime)</span>

                                <!--
                                <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> 60</span>
                                <span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
                                -->
                                <span class="fly-list-nums">
                        <i class="iconfont" title="人气">&#xe60b;</i> #(x.viewnum??0)
                        <i class="iconfont icon-pinglun1" title="回答"></i> #(x.replynum??0)
                      </span>
                            </div>
                            <div class="fly-list-badge">
                                <!--<span class="layui-badge layui-bg-red">精帖</span>-->
                            </div>
                        </li>
                        #end
                    </ul>
                    <div style="text-align: center">
                        <div class="laypage-main">
                            <a href="/column/" class="laypage-next">更多求解</a>
                        </div>
                    </div>

                </div>
            </div>
            <div class="layui-col-md4">

                #define tuijian() 暂时不需要
                <div class="fly-panel">
                    <h3 class="fly-panel-title">温馨通道</h3>
                    <ul class="fly-panel-main fly-list-static">
                        <li>
                            <a href="http://fly.layui.com/jie/4281/" target="_blank">layui 的 GitHub 及 Gitee (码云) 仓库，欢迎Star</a>
                        </li>
                        <li>
                            <a href="http://fly.layui.com/jie/5366/" target="_blank">
                                layui 常见问题的处理和实用干货集锦
                            </a>
                        </li>
                        <li>
                            <a href="http://fly.layui.com/jie/4281/" target="_blank">layui 的 GitHub 及 Gitee (码云) 仓库，欢迎Star</a>
                        </li>
                        <li>
                            <a href="http://fly.layui.com/jie/5366/" target="_blank">
                                layui 常见问题的处理和实用干货集锦
                            </a>
                        </li>
                        <li>
                            <a href="http://fly.layui.com/jie/4281/" target="_blank">layui 的 GitHub 及 Gitee (码云) 仓库，欢迎Star</a>
                        </li>
                    </ul>
                </div>
                #end

                #define xx()
                <div class="fly-panel fly-signin">
                    <div class="fly-panel-title">
                        签到
                        <i class="fly-mid"></i>
                        <a href="javascript:;" class="fly-link" id="LAY_signinHelp">说明</a>
                        <i class="fly-mid"></i>
                        <a href="javascript:;" class="fly-link" id="LAY_signinTop">活跃榜<span class="layui-badge-dot"></span></a>
                        <span class="fly-signin-days">已连续签到<cite>16</cite>天</span>
                    </div>
                    <div class="fly-panel-main fly-signin-main">
                        <button class="layui-btn layui-btn-danger" id="LAY_signin">今日签到</button>
                        <span>可获得<cite>5</cite>飞吻</span>

                        <!-- 已签到状态 -->
                        <!--
                        <button class="layui-btn layui-btn-disabled">今日已签到</button>
                        <span>获得了<cite>20</cite>飞吻</span>
                        -->
                    </div>
                </div>
                #end

                <!--最新加入-->
                <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">
                    <h3 class="fly-panel-title">
                        总用户：#(userCount??"0") 人
                    </h3>
                    <dl>
                        <!--<i class="layui-icon fly-loading">&#xe63d;</i>-->
                        #for(x : lastReg.rows??)
                        <dd>
                            <a href="/user/#(x.userid)">
                                <img src="#(x.avatar)"><cite>#(x.nickname)</cite><i>#(x.time)</i>
                            </a>
                        </dd>
                        #end
                    </dl>
                </div>

                <!--热帖-->
                <dl class="fly-panel fly-list-one">
                    <dt class="fly-panel-title">本周热帖</dt>
                    #for(x : hotView.rows??)
                    <dd>
                        <a href="/jie/detail/#(x.contentid)">#(x.title)</a>
                        <span><i class="iconfont icon-pinglun1"></i> #(x.viewnum)</span>
                    </dd>
                    #else
                    <div class="fly-none">没有相关数据</div>
                    #end
                </dl>

                #define AD()
                <div class="fly-panel">
                    <div class="fly-panel-title">
                        这里可作为广告区域
                    </div>
                    <div class="fly-panel-main">
                        <a href="http://layim.layui.com/?from=fly" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #5FB878;">LayIM 3.0 - layui 旗舰之作</a>
                    </div>
                </div>
                #end

                <div class="fly-panel fly-link">
                    <h3 class="fly-panel-title">友情链接</h3>
                    <dl class="fly-panel-main">
                        <dd><a href="http://redkale.org/" target="_blank">Redkale</a><dd>
                        <dd><a href="http://www.layui.com/" target="_blank">layui</a><dd>
                    </dl>
                </div>

            </div>
        </div>
    </div>
#end

#define js()
<script>
    layui.cache.page = '';
    layui.cache.user = {
        username: '游客'
        ,uid: -1
        ,avatar: '../res/images/avatar/00.jpg'
        ,experience: 83
        ,sex: '男'
    };
    layui.config({
        version: "3.0.0"
        ,base: '../res/mods/' //这里实际使用时，建议改成绝对路径
    }).extend({
        fly: 'index'
    }).use('fly',function () {
        var fly = layui.fly;
        //fly.userstat();
    });
</script>
#end